#include "StereoCamera.h"
#include <iostream>
#include <iomanip>

StereoCamera::StereoCamera() : rgbFrameRate(0), depthFrameRate(0) {}

StereoCamera::StereoCamera(const std::string& model, const std::string& camera,
                           const std::string& rgbResolution, int rgbFrameRate,
                           const std::string& fov, int depthFrameRate)
    : model(model), camera(camera), rgbResolution(rgbResolution), 
      rgbFrameRate(rgbFrameRate), fov(fov), depthFrameRate(depthFrameRate) {}

// Getters
std::string StereoCamera::getModel() const { return model; }
std::string StereoCamera::getCamera() const { return camera; }
std::string StereoCamera::getRgbResolution() const { return rgbResolution; }
int StereoCamera::getRgbFrameRate() const { return rgbFrameRate; }
std::string StereoCamera::getFov() const { return fov; }
int StereoCamera::getDepthFrameRate() const { return depthFrameRate; }

// Setters
void StereoCamera::setModel(const std::string& model) { this->model = model; }
void StereoCamera::setCamera(const std::string& camera) { this->camera = camera; }
void StereoCamera::setRgbResolution(const std::string& rgbResolution) { this->rgbResolution = rgbResolution; }
void StereoCamera::setRgbFrameRate(int rgbFrameRate) { this->rgbFrameRate = rgbFrameRate; }
void StereoCamera::setFov(const std::string& fov) { this->fov = fov; }
void StereoCamera::setDepthFrameRate(int depthFrameRate) { this->depthFrameRate = depthFrameRate; }

void StereoCamera::display() const {
    std::cout << "双目摄像头信息:" << std::endl;
    std::cout << "  型号: " << model << std::endl;
    std::cout << "  摄像头: " << camera << std::endl;
    std::cout << "  RGB帧分辨率: " << rgbResolution << std::endl;
    std::cout << "  RGB帧率: " << rgbFrameRate << std::endl;
    std::cout << "  FOV: " << fov << std::endl;
    std::cout << "  深度帧率: " << depthFrameRate << std::endl;
}